{extend name='app' /}
{block name='title'}个人设置{/block}

{block name="stylesheet"}
<link href="{__ADMIN__}/css/plugins/jasny/jasny-bootstrap.min.css" rel="stylesheet">

{/block}


{block name="breadcrumb"}
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-lg-10">
        <h2>个人设置</h2>
        <ol class="breadcrumb">
            <li class="breadcrumb-item">
                <a>系统设置</a>
            </li>
            <li class="breadcrumb-item active">
                <strong>个人设置</strong>
            </li>
        </ol>
    </div>
</div>
{/block}


{block name="content"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">


        <div class="col-md-6">
            <div class="panel panel-default">
                <div class="panel-heading">
                    个人配置
                </div>
                <div class="panel-body">
                    <form role="form" method="post" enctype="multipart/form-data" id="editForm">

                        <div class="ibox-content no-padding border-left-right block-personal-img mb-2">
                            <img src="{empty name='$info->headimg'}{__ADMIN__}/dist/img/default-img.png{else/}{$info->headimg}{/empty}" alt="" class="img-fluid img-circle img-thumbnail">
                        </div>

                        <div class="fileinput fileinput-new text-center" data-provides="fileinput" style="width: 100%">
                                <span class="btn btn-default btn-file" style="margin: 0 auto;">
                                    <span class="fileinput-new">上传头像</span>
                                    <span class="fileinput-exists">修改</span>
                                    <input type="file" name="headimg">
                                </span>
                            <span class="fileinput-filename"></span>
                            <a href="javascript:;" class="close fileinput-exists" data-dismiss="fileinput" style="float: none">&times;</a>
                        </div>

                        <div class="ibox-content profile-content">
                            <div class="form-group">
                                <label>用户名</label>
                                <input type="text" class="form-control form-control-sm" value="{$info->name}" disabled="disabled">
                            </div>
                            <div class="form-group">
                                <label>登录密码</label>
                                <input type="password" placeholder="不修改密码请留空" name="password" class="form-control form-control-sm">
                            </div>
                            <div class="form-group">
                                <button class="btn btn-primary btn-sm" type="button" onclick="post_form($(this),'')">
                                    保存
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

{/block}

{block name="script"}
<script src="{__ADMIN__}/js/plugins/jasny/jasny-bootstrap.min.js"></script>
<script>
    $(function () {
        let opera_page = get_url_query('opera_page');
        if (opera_page) {
            $('#tab-opera').addClass('active');
            $('#tab-login').removeClass('active');

            $("a[href='#tab-opera']").addClass('active')
            $("a[href='#tab-login']").removeClass('active')
        }

        let login_page = get_url_query('login_page');
        if (login_page) {
            $('#tab-login').addClass('active');
            $('#tab-opera').removeClass('active');

            $("a[href='#tab-login']").addClass('active')
            $("a[href='#tab-opera']").removeClass('active')
        }
    })
</script>
{/block}
